import './assets/main.css'

import { createApp } from 'vue'
import App from './App.vue'
// 导入路由器
import router from '@/router'
// 导入element-plus
import ElementPlus from 'element-plus'
import 'element-plus/dist/index.css'
// 挂载Store
import { store, key } from '@/store'
import * as antIcons from '@ant-design/icons-vue'
// 导入图标选择器
import IconPicker from '@/components/IconPicker.vue'
// 导入内容头组件
import ContentHeader from '@/components/ContentHeader.vue'

const app = createApp(App);
// 全局注册图标
Object.keys(antIcons).forEach((key: string) => {
  app.component(key, antIcons[key as keyof typeof antIcons])
})
// 全局注册组件
app.component('IconPicker', IconPicker)
app.component('ContentHeader', ContentHeader)
// 全局注册组件
app.use(ElementPlus).use(router).use(store, key).mount('#app')
